1. Technical Field
The present invention relates generally to instrumentation, profiling, and debugging of computer programs. Specifically, the present invention is directed to a method, computer program product, and data processing system for instrumenting a database application to detect errors and performance issues.
2. Description of the Related Art
Databases are computerized information storage and retrieval systems. A Relational Database Management System (RDBMS) is a database management system (DBMS) that stores information as tables containing tuples of data. These tables define relations, which are mappings between associated items of data. The theory underlying relational databases was initially developed by in the early 1970s by Edgar F. Codd, a researcher at International Business Machines Corporation, who, in 1981, was awarded the Turing Award (the highest award in the Computer Science field) for his pioneering work.
RDBMS software using a Structured Query Language (SQL) interface is well known in the art. The SQL interface has evolved into a standard language for RDBMS software and has been adopted as such by both the American National Standards Organization (ANSI) and the International Standards Organization (ISO). In RDBMS software all data is externally structured into tables. The SQL interface allows users to formulate queries and data-modification operations on the tables interactively, as a batch process, or through SQL code that is embedded in a host language, such as C, C++, JAVA, COBOL, or the like.
Although other proprietary interfaces also exist, most modern, commercially-available database systems support a standard interface, known as ODBC (Open DataBase Connectivity), for allowing application code to access or modify a database in a well-defined manner. The JAVA programming language and runtime environment provides its own standard database interface, known as JDBC (JAVA DataBase Connectivity). In a typical JAVA-based database application, the application accesses the database through the standard interface provided by JDBC, while the actual connection to the database is performed by a database driver or adapter component, which serves as an intermediary between the standard JAVA runtime and the database. Typically, these drivers or adapters are specific to a particular database system or vendor (such as the DB2 database management system, a product of International Business Machines Corporation). JDBC is heavily used in developing applications for use in a J2EE (JAVA 2 Enterprise Edition) application server environment.
Like all programs, database applications are often prone to errors and inefficiencies (such as resource leaks, for instance). Traditionally, detecting these errors and inefficiencies has relied on tracing the execution of the application server runtime or the database runtime. In many cases, neither of these techniques is sufficient to diagnose the problem, and the additional performance overhead required to enable such techniques can seriously degrade the performance or behavior of the application.
What is needed, therefore, is a simpler and more efficient manner of diagnosing errors and inefficiencies in database application code. The present invention provides a solution to this and other problems, and offers other advantages over previous solutions.